package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.CarDriverInfoMapper;
import com.ruoyi.system.domain.CarDriverInfo;
import com.ruoyi.system.service.ICarDriverInfoService;

/**
 * 司机列Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-09-09
 */
@Service
public class CarDriverInfoServiceImpl implements ICarDriverInfoService 
{
    @Autowired
    private CarDriverInfoMapper carDriverInfoMapper;

    /**
     * 查询司机列
     * 
     * @param id 司机列主键
     * @return 司机列
     */
    @Override
    public CarDriverInfo selectCarDriverInfoById(Long id)
    {
        return carDriverInfoMapper.selectCarDriverInfoById(id);
    }

    /**
     * 查询司机列列表
     * 
     * @param carDriverInfo 司机列
     * @return 司机列
     */
    @Override
    public List<CarDriverInfo> selectCarDriverInfoList(CarDriverInfo carDriverInfo)
    {
        return carDriverInfoMapper.selectCarDriverInfoList(carDriverInfo);
    }

    /**
     * 新增司机列
     * 
     * @param carDriverInfo 司机列
     * @return 结果
     */
    @Override
    public int insertCarDriverInfo(CarDriverInfo carDriverInfo)
    {
        carDriverInfo.setCreateTime(DateUtils.getNowDate());
        return carDriverInfoMapper.insertCarDriverInfo(carDriverInfo);
    }

    /**
     * 修改司机列
     * 
     * @param carDriverInfo 司机列
     * @return 结果
     */
    @Override
    public int updateCarDriverInfo(CarDriverInfo carDriverInfo)
    {
        carDriverInfo.setUpdateTime(DateUtils.getNowDate());
        return carDriverInfoMapper.updateCarDriverInfo(carDriverInfo);
    }

    /**
     * 批量删除司机列
     * 
     * @param ids 需要删除的司机列主键
     * @return 结果
     */
    @Override
    public int deleteCarDriverInfoByIds(Long[] ids)
    {
        return carDriverInfoMapper.deleteCarDriverInfoByIds(ids);
    }

    /**
     * 删除司机列信息
     * 
     * @param id 司机列主键
     * @return 结果
     */
    @Override
    public int deleteCarDriverInfoById(Long id)
    {
        return carDriverInfoMapper.deleteCarDriverInfoById(id);
    }
}
